agora inbox for [email protected]
help / color / mirror / Atom feedShould we disable Solaris using Unix Domain Sockets in the regression test?
971+ messages / 3 participants
[nested] [flat]
* Should we disable Solaris using Unix Domain Sockets in the regression test?
@ 2001-09-23 05:11 Justin Clift <[email protected]>
2001-09-23 05:48 ` Re: Should we disable Solaris using Unix Domain Sockets in the regression test? Ian Lance Taylor <[email protected]>
0 siblings, 1 reply; 971+ messages in thread
From: Justin Clift @ 2001-09-23 05:11 UTC (permalink / raw)
To: pgsql-hackers
Hi all,
Did anyone ever figure out why Solaris boxes had those random failures
during the regression tests?
If no, then should we ensure the regression test on Solaris run's over
TCP instead (like BeOS and QNX do)? To do this is a one-line fix in the
shell script.
Regards and best wishes,
Justin Clift
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
^ permalink raw reply [nested|flat] 971+ messages in thread
* Re: Should we disable Solaris using Unix Domain Sockets in the regression test?
2001-09-23 05:11 Should we disable Solaris using Unix Domain Sockets in the regression test? Justin Clift <[email protected]>
@ 2001-09-23 05:48 ` Ian Lance Taylor <[email protected]>
2001-09-23 06:00 ` Re: Should we disable Solaris using Unix Domain Sockets in the Justin Clift <[email protected]>
0 siblings, 1 reply; 971+ messages in thread
From: Ian Lance Taylor @ 2001-09-23 05:48 UTC (permalink / raw)
To: Justin Clift <[email protected]>; +Cc: pgsql-hackers
Justin Clift <[email protected]> writes:
> Did anyone ever figure out why Solaris boxes had those random failures
> during the regression tests?
It should be better now that listen() is being called with a larger
number. The basic problem is that Solaris actually honors the
listen() backlog argument, and if more than that many Unix socket
clients attempt to connect simultaneously, some are rejected
immediately.
Ian
^ permalink raw reply [nested|flat] 971+ messages in thread
* Re: Should we disable Solaris using Unix Domain Sockets in the
2001-09-23 05:11 Should we disable Solaris using Unix Domain Sockets in the regression test? Justin Clift <[email protected]>
2001-09-23 05:48 ` Re: Should we disable Solaris using Unix Domain Sockets in the regression test? Ian Lance Taylor <[email protected]>
@ 2001-09-23 06:00 ` Justin Clift <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Justin Clift @ 2001-09-23 06:00 UTC (permalink / raw)
To: Ian Lance Taylor <[email protected]>; +Cc: pgsql-hackers
Cool.
:)
Regards and best wishes,
Justin Clift
Ian Lance Taylor wrote:
>
> Justin Clift <[email protected]> writes:
>
> > Did anyone ever figure out why Solaris boxes had those random failures
> > during the regression tests?
>
> It should be better now that listen() is being called with a larger
> number. The basic problem is that Solaris actually honors the
> listen() backlog argument, and if more than that many Unix socket
> clients attempt to connect simultaneously, some are rejected
> immediately.
>
> Ian
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
* [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length
@ 2026-03-12 15:12 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 971+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:12 UTC (permalink / raw)
---
src/backend/commands/cluster.c | 2 +-
src/backend/replication/pgoutput_repack/pgoutput_repack.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 29440fb75cd..244843ee1cf 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -3113,7 +3113,7 @@ restore_tuple(BufFile *file, Relation relation, MemoryContext cxt)
uint32 t_len;
HeapTuple tup;
MemoryContext oldcxt;
- uint32 natt_ext;
+ int natt_ext;
List *attrs_ext = NIL;
oldcxt = MemoryContextSwitchTo(cxt);
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 79fc611b9ff..61cd7c52ae6 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -175,7 +175,7 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
BufFile *file;
char kind_byte = (char) kind;
List *attrs_ext = NIL;
- uint32 natt_ext;
+ int natt_ext;
dstate = (RepackDecodingState *) ctx->output_writer_private;
file = dstate->file;
@@ -237,14 +237,12 @@ store_change(LogicalDecodingContext *ctx, Relation relation,
Assert(VARATT_IS_EXTERNAL_ONDISK(varlena_pointer));
}
}
- natt_ext = list_length(attrs_ext);
}
- else
- natt_ext = 0;
/* Write the number of external attributes. */
+ natt_ext = list_length(attrs_ext);
BufFileWrite(file, &natt_ext, sizeof(natt_ext));
- /* ... and the attributes themselves, if there are some. */
+ /* ... and the attributes themselves, if any */
foreach_ptr(varlena, attr_val, attrs_ext)
{
varlena *ext_val;
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename="0007-no-need-for-palloc0-here-simple-palloc-is-enough.nocfbot.txt"
^ permalink raw reply [nested|flat] 971+ messages in thread
end of thread, other threads:[~2026-03-12 15:12 UTC | newest]
Thread overview: 971+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-09-23 05:11 Should we disable Solaris using Unix Domain Sockets in the regression test? Justin Clift <[email protected]>
2001-09-23 05:48 ` Ian Lance Taylor <[email protected]>
2001-09-23 06:00 ` Re: Should we disable Solaris using Unix Domain Sockets in the Justin Clift <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email protected]>
2026-03-12 15:12 [PATCH 6/9] use 'int' instead of 'uint32' for the result of list_length Álvaro Herrera <[email 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