agora inbox for [email protected]
help / color / mirror / Atom feedAuto Type conversion
978+ messages / 3 participants
[nested] [flat]
* Auto Type conversion
@ 1998-05-04 16:08 Jackson, DeJuan <[email protected]>
1998-05-04 16:52 ` Re: [HACKERS] Auto Type conversion Thomas G. Lockhart <[email protected]>
0 siblings, 1 reply; 978+ messages in thread
From: Jackson, DeJuan @ 1998-05-04 16:08 UTC (permalink / raw)
To: PostgreSQL Hackers Mailing List <[email protected]>
Can I assume that this as well as the text->varchar will be fixed in
6.4?
If anyone needs any help with this I'm open (it'll require some serious
hand holding though, and flowers), Thomas?!.
adserver=> select NOW();
now
----------------------
1998-05-04 10:03:29-05
(1 row)
adserver=> select NOW()::DATETIME;
datetime
----------------------------
Mon May 04 10:03:40 1998 CDT
(1 row)
adserver=> select NOW()::DATETIME::TIMESTAMP;
ERROR: function datetime_stamp(datetime) does not exist
--DEJ
^ permalink raw reply [nested|flat] 978+ messages in thread
* Re: [HACKERS] Auto Type conversion
1998-05-04 16:08 Auto Type conversion Jackson, DeJuan <[email protected]>
@ 1998-05-04 16:52 ` Thomas G. Lockhart <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Thomas G. Lockhart @ 1998-05-04 16:52 UTC (permalink / raw)
To: Jackson, DeJuan <[email protected]>; +Cc: PostgreSQL Hackers Mailing List <[email protected]>
> Can I assume that this as well as the text->varchar will be fixed in
> 6.4?
text->varchar is likely to be addressed (as well as other string issues
such as ensuring correct maximum length in target columns).
> adserver=> select NOW()::DATETIME::TIMESTAMP;
> ERROR: function datetime_stamp(datetime) does not exist
Hmm. I wrote most of the routines you might want to go _to_ datetime,
but did not fully populate the functions to go _away_ from datetime. For
timestamp in particular, I didn't want to spend the time, since I was
planning on replacing timestamp with datetime sometime soon.
However, I haven't taken that step yet because:
1) I think that the current datetime implementation makes more sense
than the SQL92 specification for timestamp (of course, I wrote it so I'm
a bit biased :)
2) imho implementing _full_ SQL92 timestamp behavior is a waste of time
(damaged functionality wrt datetime and bizarre syntax, usage, and
behavior, among other reasons).
3) others may have a strong opinion that a _full_ SQL92 timestamp is
important (I would hope that they have a real need for it, rather than
it being a "well, it should" argument because afaik no one actually uses
the most arcane SQL92 features of timestamp, since they make little
sense).
4) I'm not likely to be willing to support a damaged form of
datetime/timestamp at the expense of a full-featured datetime, but the
project might decide to head that direction.
My feeling is that the SQL92 form of timestamp is a mish-mash of
requirements and features to accomodate existing database products.
Starting from scratch, no one would have come close to the SQL92
standard for this. The datetime type is more in keeping with how date
and time actually behave, and is what timestamp should be.
Anyway, a discussion of this may be in order. Anyone??
- Tom
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
end of thread, other threads:[~2026-03-11 13:53 UTC | newest]
Thread overview: 978+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-05-04 16:08 Auto Type conversion Jackson, DeJuan <[email protected]>
1998-05-04 16:52 ` Thomas G. Lockhart <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[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