agora inbox for [email protected]
help / color / mirror / Atom feedpgbench enhancements
975+ messages / 4 participants
[nested] [flat]
* pgbench enhancements
@ 2006-07-26 08:45 Tatsuo Ishii <[email protected]>
2006-07-26 11:24 ` Re: pgbench enhancements Tatsuo Ishii <[email protected]>
2006-07-26 15:29 ` Re: pgbench enhancements [email protected]
0 siblings, 2 replies; 975+ messages in thread
From: Tatsuo Ishii @ 2006-07-26 08:45 UTC (permalink / raw)
To: pgsql-hackers
Hi,
I have committed contrib/pgbench enhanments contributed by Tomoaki
Sato from SRA OSS, Inc. Japan.
- predefined variable "tps"
The value of variable tps is taken from the scaling factor
specified by -s option.
- -D option
Variable values can be defined by -D option.
- \set command now allows arithmetic calculations.
enjoy,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
^ permalink raw reply [nested|flat] 975+ messages in thread
* Re: pgbench enhancements
2006-07-26 08:45 pgbench enhancements Tatsuo Ishii <[email protected]>
@ 2006-07-26 11:24 ` Tatsuo Ishii <[email protected]>
2006-07-26 14:58 ` Re: pgbench enhancements Tom Lane <[email protected]>
1 sibling, 1 reply; 975+ messages in thread
From: Tatsuo Ishii @ 2006-07-26 11:24 UTC (permalink / raw)
To: pgsql-hackers
> I have committed contrib/pgbench enhanments contributed by Tomoaki
> Sato from SRA OSS, Inc. Japan.
>
> - predefined variable "tps"
> The value of variable tps is taken from the scaling factor
> specified by -s option.
>
> - -D option
> Variable values can be defined by -D option.
>
> - \set command now allows arithmetic calculations.
>
> enjoy,
BTW, running long benchmark using pgbench on BIG tables easily causes
an integer overflow error in following SQLs:
update accounts set abalance = abalance + :delta where aid = :aid;
update tellers set tbalance = tbalance + :delta where tid = :tid;
update branches set bbalance = bbalance + :delta where bid = :bid;
I'm inclined to change abalance, tbalance and bbalance column to
BIGINT to avoid the error. Opinion?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
^ permalink raw reply [nested|flat] 975+ messages in thread
* Re: pgbench enhancements
2006-07-26 08:45 pgbench enhancements Tatsuo Ishii <[email protected]>
2006-07-26 11:24 ` Re: pgbench enhancements Tatsuo Ishii <[email protected]>
@ 2006-07-26 14:58 ` Tom Lane <[email protected]>
2006-07-26 22:42 ` Re: pgbench enhancements Tatsuo Ishii <[email protected]>
0 siblings, 1 reply; 975+ messages in thread
From: Tom Lane @ 2006-07-26 14:58 UTC (permalink / raw)
To: Tatsuo Ishii <[email protected]>; +Cc: pgsql-hackers
Tatsuo Ishii <[email protected]> writes:
> BTW, running long benchmark using pgbench on BIG tables easily causes
> an integer overflow error in following SQLs:
Right.
> I'm inclined to change abalance, tbalance and bbalance column to
> BIGINT to avoid the error. Opinion?
No. The problem is that the deltas are invariably positive, which is
not realistic (at least *my* bank balance isn't uniformly increasing :-().
I think the correct fix is just to tweak the range of the randomly
distributed deltas to be plus and minus not always plus.
If you change to bigint then post-change results won't be strictly
comparable to pre-change results because of the difference in execution
costs.
regards, tom lane
^ permalink raw reply [nested|flat] 975+ messages in thread
* Re: pgbench enhancements
2006-07-26 08:45 pgbench enhancements Tatsuo Ishii <[email protected]>
2006-07-26 11:24 ` Re: pgbench enhancements Tatsuo Ishii <[email protected]>
2006-07-26 14:58 ` Re: pgbench enhancements Tom Lane <[email protected]>
@ 2006-07-26 22:42 ` Tatsuo Ishii <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Tatsuo Ishii @ 2006-07-26 22:42 UTC (permalink / raw)
To: [email protected]; +Cc: pgsql-hackers
> Tatsuo Ishii <[email protected]> writes:
> > BTW, running long benchmark using pgbench on BIG tables easily causes
> > an integer overflow error in following SQLs:
>
> Right.
>
> > I'm inclined to change abalance, tbalance and bbalance column to
> > BIGINT to avoid the error. Opinion?
>
> No. The problem is that the deltas are invariably positive, which is
> not realistic (at least *my* bank balance isn't uniformly increasing :-().
> I think the correct fix is just to tweak the range of the randomly
> distributed deltas to be plus and minus not always plus.
I have never thought about it. Seems nice idea. Thanks.
> If you change to bigint then post-change results won't be strictly
> comparable to pre-change results because of the difference in execution
> costs.
Yes, that was my concerning too.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
^ permalink raw reply [nested|flat] 975+ messages in thread
* Re: pgbench enhancements
2006-07-26 08:45 pgbench enhancements Tatsuo Ishii <[email protected]>
@ 2006-07-26 15:29 ` [email protected]
2006-07-26 15:42 ` Re: pgbench enhancements Tatsuo Ishii <[email protected]>
1 sibling, 1 reply; 975+ messages in thread
From: [email protected] @ 2006-07-26 15:29 UTC (permalink / raw)
To: Tatsuo Ishii <[email protected]>; +Cc: pgsql-hackers
> Hi,
>
> I have committed contrib/pgbench enhanments contributed by Tomoaki
> Sato from SRA OSS, Inc. Japan.
>
> - predefined variable "tps"
> The value of variable tps is taken from the scaling factor
> specified by -s option.
>
> - -D option
> Variable values can be defined by -D option.
>
> - \set command now allows arithmetic calculations.
>
Was there a previous patch posted for this? I don't recall seeing it.
cheers
andrew
^ permalink raw reply [nested|flat] 975+ messages in thread
* Re: pgbench enhancements
2006-07-26 08:45 pgbench enhancements Tatsuo Ishii <[email protected]>
2006-07-26 15:29 ` Re: pgbench enhancements [email protected]
@ 2006-07-26 15:42 ` Tatsuo Ishii <[email protected]>
2006-07-26 15:52 ` Re: pgbench enhancements [email protected]
0 siblings, 1 reply; 975+ messages in thread
From: Tatsuo Ishii @ 2006-07-26 15:42 UTC (permalink / raw)
To: [email protected]; +Cc: pgsql-hackers
> > Hi,
> >
> > I have committed contrib/pgbench enhanments contributed by Tomoaki
> > Sato from SRA OSS, Inc. Japan.
> >
> > - predefined variable "tps"
> > The value of variable tps is taken from the scaling factor
> > specified by -s option.
> >
> > - -D option
> > Variable values can be defined by -D option.
> >
> > - \set command now allows arithmetic calculations.
> >
>
>
> Was there a previous patch posted for this? I don't recall seeing it.
Are you saying that I should have posted patches and called for
discussion? I omit the step because a) pgbench is a contrib program,
b) the changes do not break the backward compatibility.
I always call for discussions for questionable part. (for example,
column type change proposal for pgbench tables).
--
Tatsuo Ishii
SRA OSS, Inc. Japan
^ permalink raw reply [nested|flat] 975+ messages in thread
* Re: pgbench enhancements
2006-07-26 08:45 pgbench enhancements Tatsuo Ishii <[email protected]>
2006-07-26 15:29 ` Re: pgbench enhancements [email protected]
2006-07-26 15:42 ` Re: pgbench enhancements Tatsuo Ishii <[email protected]>
@ 2006-07-26 15:52 ` [email protected]
0 siblings, 0 replies; 975+ messages in thread
From: [email protected] @ 2006-07-26 15:52 UTC (permalink / raw)
To: Tatsuo Ishii <[email protected]>; +Cc: pgsql-hackers
>> > Hi,
>> >
>> > I have committed contrib/pgbench enhanments contributed by Tomoaki
>> > Sato from SRA OSS, Inc. Japan.
>> >
>> > - predefined variable "tps"
>> > The value of variable tps is taken from the scaling factor
>> > specified by -s option.
>> >
>> > - -D option
>> > Variable values can be defined by -D option.
>> >
>> > - \set command now allows arithmetic calculations.
>> >
>>
>>
>> Was there a previous patch posted for this? I don't recall seeing it.
>
> Are you saying that I should have posted patches and called for
> discussion? I omit the step because a) pgbench is a contrib program,
> b) the changes do not break the backward compatibility.
>
> I always call for discussions for questionable part. (for example,
> column type change proposal for pgbench tables).
It's not a big deal, but I was under the impression that even in these
circumstances a patch should be posted first, especially if it changes
user visible behaviour.
cheers
andrew
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 975+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 975+ messages in thread
end of thread, other threads:[~2026-03-12 15:12 UTC | newest]
Thread overview: 975+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-07-26 08:45 pgbench enhancements Tatsuo Ishii <[email protected]>
2006-07-26 11:24 ` Tatsuo Ishii <[email protected]>
2006-07-26 14:58 ` Tom Lane <[email protected]>
2006-07-26 22:42 ` Tatsuo Ishii <[email protected]>
2006-07-26 15:29 ` [email protected]
2006-07-26 15:42 ` Tatsuo Ishii <[email protected]>
2006-07-26 15:52 ` [email protected]
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[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